<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.ViewSourceCodeTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">

                    <h:outputText value="#{bundle.ViewSourceCodeLabel_hourlyRate}"/>
                    <h:outputText value="#{sourceCodeController.selected.hourlyRate}" title="#{bundle.ViewSourceCodeTitle_hourlyRate}"/>

                    <h:outputText value="#{bundle.ViewSourceCodeLabel_startDate}"/>
                    <h:outputText value="#{sourceCodeController.selected.startDate}" title="#{bundle.ViewSourceCodeTitle_startDate}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:outputText>

                    <h:outputText value="#{bundle.ViewSourceCodeLabel_expireDate}"/>
                    <h:outputText value="#{sourceCodeController.selected.expireDate}" title="#{bundle.ViewSourceCodeTitle_expireDate}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:outputText>

                    <h:outputText value="#{bundle.ViewSourceCodeLabel_subcontResName}"/>
                    <h:outputText value="#{sourceCodeController.selected.subcontResName.subResName}" title="#{bundle.ViewSourceCodeTitle_subcontResName}"/>

                    <h:outputText value="#{bundle.ViewSourceCodeLabel_role}"/>
                    <h:outputText value="#{sourceCodeController.selected.role.jobTitle}" title="#{bundle.ViewSourceCodeTitle_role}"/>

                    <h:outputText value="#{bundle.ViewSourceCodeLabel_projectCode}"/>
                    <h:outputText value="#{sourceCodeController.selected.projectCode.projectCode}" title="#{bundle.ViewSourceCodeTitle_projectCode}"/>

                    <h:outputText value="Activty Code"/>
                    <h:outputText value="#{sourceCodeController.selected.activityCode}" title="Activity Code"/>
                    
                    <h:outputText value="#{bundle.ViewSourceCodeLabel_employee}"/>
                    <h:outputText value="#{sourceCodeController.selected.employee.businessEmail}" title="#{bundle.ViewSourceCodeTitle_employee}"/>

                    <h:outputText value="#{bundle.ViewSourceCodeLabel_currency}"/>
                    <h:outputText value="#{sourceCodeController.selected.currency.currencyCode}" title="#{bundle.ViewSourceCodeTitle_currency}"/>

                </h:panelGrid>
                <br />
                <h:commandButton type="submit" action="#{sourceCodeController.destroyAndView}" value="#{bundle.ViewSourceCodeDestroyLink}"/>
                <h:commandButton type="submit" action="Edit" value="#{bundle.ViewSourceCodeEditLink}"/>
            </h:form>

            <h:form>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <h:commandButton action="#{sourceCodeController.prepareCreate}" value="#{bundle.ViewSourceCodeCreateLink}" />
                <h:commandButton action="#{sourceCodeController.prepareList}" value="#{bundle.ViewSourceCodeShowAllLink}"/>
                <h:button value="Back to Home" outcome="/index" />
            </h:form>
        </ui:define>
    </ui:composition>
</html>
